package com.sixth.controller.wx;

import com.sixth.bean.bo.WXFeedBackBO;
import com.sixth.bean.common.BaseRespVo;
import com.sixth.constant.Constant;
import com.sixth.service.AdminFeedbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ljh
 * @version 1.0
 * @describition:
 * @since 2022/9/11 16:38
 **/

@RestController
@RequestMapping("wx/feedback")
public class WXFeedBackController {

    @Autowired
    AdminFeedbackService adminFeedbackService;

    @RequestMapping("submit")
    public BaseRespVo submit(@RequestBody WXFeedBackBO wxFeedBackBO){

        int code = adminFeedbackService.wxSubmit(wxFeedBackBO);
        if (code == Constant.NON) {
            return BaseRespVo.invalidData();
        }

        return BaseRespVo.ok();
    }
}
